//
// NeL - bindings
// Copyright (C) 2010 Naush
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU Affero General Public License as
//published by the Free Software Foundation, either version 3 of the
//License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU Affero General Public License for more details.
//
//You should have received a copy of the GNU Affero General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
package org.ryzom.nel.misc;

public class CSheetId {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CSheetId(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CSheetId obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nelmiscJNI.delete_CSheetId(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public static CSheetId getUnknown() {
    long cPtr = nelmiscJNI.CSheetId_Unknown_get();
    return (cPtr == 0) ? null : new CSheetId(cPtr, false);
  }

  public CSheetId(long sheetRef) {
    this(nelmiscJNI.new_CSheetId__SWIG_0(sheetRef), true);
  }

  public CSheetId() {
    this(nelmiscJNI.new_CSheetId__SWIG_1(), true);
  }

  public CSheetId(String sheetName) {
    this(nelmiscJNI.new_CSheetId__SWIG_2(sheetName), true);
  }

  public boolean buildSheetId(String sheetName) {
    return nelmiscJNI.CSheetId_buildSheetId__SWIG_0(swigCPtr, this, sheetName);
  }

  public void buildSheetId(long shortId, long type) {
    nelmiscJNI.CSheetId_buildSheetId__SWIG_1(swigCPtr, this, shortId, type);
  }

  public static void init(boolean removeUnknownSheet) {
    nelmiscJNI.CSheetId_init__SWIG_0(removeUnknownSheet);
  }

  public static void init() {
    nelmiscJNI.CSheetId_init__SWIG_1();
  }

  public static void initWithoutSheet() {
    nelmiscJNI.CSheetId_initWithoutSheet();
  }

  public static void uninit() {
    nelmiscJNI.CSheetId_uninit();
  }

  public long asInt() {
    return nelmiscJNI.CSheetId_asInt(swigCPtr, this);
  }

  public long getSheetType() {
    return nelmiscJNI.CSheetId_getSheetType(swigCPtr, this);
  }

  public long getShortId() {
    return nelmiscJNI.CSheetId_getShortId(swigCPtr, this);
  }

  public CSheetId assign(CSheetId sheetId) {
    return new CSheetId(nelmiscJNI.CSheetId_assign__SWIG_0(swigCPtr, this, CSheetId.getCPtr(sheetId), sheetId), false);
  }

  public CSheetId assign(String sheetName) {
    return new CSheetId(nelmiscJNI.CSheetId_assign__SWIG_1(swigCPtr, this, sheetName), false);
  }

  public CSheetId assign(long sheetRef) {
    return new CSheetId(nelmiscJNI.CSheetId_assign__SWIG_2(swigCPtr, this, sheetRef), false);
  }

  public boolean lt(CSheetId sheetRef) {
    return nelmiscJNI.CSheetId_lt(swigCPtr, this, CSheetId.getCPtr(sheetRef), sheetRef);
  }

  public boolean isEqual(CSheetId sheetRef) {
    return nelmiscJNI.CSheetId_isEqual(swigCPtr, this, CSheetId.getCPtr(sheetRef), sheetRef);
  }

  public boolean notEqual(CSheetId sheetRef) {
    return nelmiscJNI.CSheetId_notEqual(swigCPtr, this, CSheetId.getCPtr(sheetRef), sheetRef);
  }

  public String toString(boolean ifNotFoundUseNumericId) {
    return nelmiscJNI.CSheetId_toString(swigCPtr, this, ifNotFoundUseNumericId);
  }

  public String toString_c() {
    return nelmiscJNI.CSheetId_toString_c(swigCPtr, this);
  }

  public void serial(IStream f) {
    nelmiscJNI.CSheetId_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public static void display() {
    nelmiscJNI.CSheetId_display__SWIG_0();
  }

  public static void display(long type) {
    nelmiscJNI.CSheetId_display__SWIG_1(type);
  }

  public static void buildIdVector(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t result) {
    nelmiscJNI.CSheetId_buildIdVector__SWIG_0(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t.getCPtr(result));
  }

  public static void buildIdVector(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t result, long type) {
    nelmiscJNI.CSheetId_buildIdVector__SWIG_1(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t.getCPtr(result), type);
  }

  public static void buildIdVector(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t result, Vector_String resultFilenames, long type) {
    nelmiscJNI.CSheetId_buildIdVector__SWIG_2(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t.getCPtr(result), Vector_String.getCPtr(resultFilenames), resultFilenames, type);
  }

  public static void buildIdVector(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t result, String fileExtension) {
    nelmiscJNI.CSheetId_buildIdVector__SWIG_3(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t.getCPtr(result), fileExtension);
  }

  public static void buildIdVector(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t result, Vector_String resultFilenames, String fileExtension) {
    nelmiscJNI.CSheetId_buildIdVector__SWIG_4(SWIGTYPE_p_std__vectorT_NLMISC__CSheetId_t.getCPtr(result), Vector_String.getCPtr(resultFilenames), resultFilenames, fileExtension);
  }

  public static String fileExtensionFromType(long type) {
    return nelmiscJNI.CSheetId_fileExtensionFromType(type);
  }

  public static long typeFromFileExtension(String fileExtension) {
    return nelmiscJNI.CSheetId_typeFromFileExtension(fileExtension);
  }

}
